Multi-processor (i.e. multiple CPUs (Central Processing Unit)) systems may operate in different modes. For example, a multi-processor system may operate in a lock-step (safety) mode or in a non-lock-step (performance) mode. Lock-step mode is used to achieve high diagnostic ability. In lock-step mode, one or more processors (CPUs) perform the same operations. For example, when two processors are operating in the lock-step mode, they are initialized to the same state during system start-up, and they receive the same inputs (Le, code, bus operations and asynchronous events). As a consequence, during lock-step mode, the state of the two processors is identical from clock to clock when no errors occur.
However, when an error occurs in either processor between the states of two processors, differences in the behavior may be detected by comparing signals at key places (e.g. data buses and address buses) in the multi-processor system. In the lockstep mode, the multi-processor system monitors signals at key places and flags an error when there is a discrepancy.
In performance mode, the processors in a multi-processor system may be used to execute a single sequence of instructions in multiple contexts (single-instruction, multiple-data (SIMD)) or multiple sequences of instructions in multiple contexts (multiple-instruction, multiple-data (MIMD)). SIMD multiprocessing is well suited to parallel or vector processing, in which a very large set of data can be divided into parts that are individually subjected to identical but independent operations. A single instruction stream directs the operation of multiple CPUs to perform the same manipulations simultaneously on potentially large amounts of data.
MIMD multiprocessing is suitable for a wide variety of tasks in which completely independent and parallel execution of instructions touching different sets of data can be put to productive use. Processing may be divided into multiple threads, each with its own hardware processor state, within a single software-defined process or within multiple processes. Insofar as a system has multiple threads awaiting dispatch (either system or user threads), this architecture makes good use of hardware resources.
A multi-processor system, such as a system-on-a-chip (SOC) or an embedded system, may contain digital, analog, mixed-signal and often radio-frequency functions, all on a single chip substrate. An SOC or embedded system is a multi-processor system often used to perform one or a few dedicated functions. Often these dedicated functions have real-time computing constraints where safety is an issue. For example, an SOC or an embedded system may be used to control the braking of an automobile.
Therefore, it is important that a multi-processor system may be switched from a safety mode to a performance or from a performance mode to a safety mode. When there is a demand for data integrity, such as in the safety mode, the multi-processor system may be switched to the safety mode. When there is a demand for performance and data integrity is less important, the multi-processor system may be switched to the performance mode. When the multi-processor system switches modes, it is important that the operating system (OS) switch cleanly between the modes with as little time delay as possible.